# 导包
import urllib.request
from urllib import parse
url = "http://127.0.0.1:5000/"
resp = urllib.request.urlopen(url=url)
data = resp.read()
fileName = data.decode()
# fileName = urllib.parse.quote(fileName)
print(fileName)
# print(fileName)
resp = urllib.request.urlopen(url=url+"?fileName="+urllib.parse.quote(fileName))
data = resp.read()
f = open("download"+fileName, "wb")
f.write(data)
f.close()
print(fileName, len(data))




